import 'package:flutter/material.dart';
import 'package:imitating_tiktok/pages/home_pages/models/video_model.dart';
import 'package:marquee/marquee.dart';

class HomeBottomBar extends StatelessWidget {
  final Video video;
  const HomeBottomBar({Key? key, required this.video}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(8.0),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            "@${video.user.userName}",
            style: TextStyle(
              color: Colors.white,
              fontSize: 18.0,
              fontWeight: FontWeight.w500,
            ),
          ),
          SizedBox(height: 5),
          Text(
            video.videoDesc,
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
            style: TextStyle(
              color: Colors.white,
              fontSize: 14,
            ),
          ),
          SizedBox(height: 5),
          Row(
            children: [
              Icon(
                Icons.music_note_outlined,
                color: Colors.white,
              ),
              Container(
                margin: EdgeInsets.only(left: 5),
                height: 20,
                width: MediaQuery.of(context).size.width / 2.0,
                child: Marquee(
                  text: "${video.user.userName}原声   *    ",
                  velocity: 30,
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 14,
                  ),
                ),
              ),
            ],
          ),
        ],
      ),
    );
  }
}
